GET /api/admin/learn/exams
List of Exams

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 1,
    "title": "Exam",
    "questions": [
      {
        "id": 13,
        "body": "Determining your ______ is the first step to creating an effective social media strategy."
      },
      ...
    ]
  },
  ...
]

GET /api/admin/learn/courses/:course_id/exams/:id
Exam Info

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "id": 1,
  "title": "Exam",
  "questions": [
    {
      "id": 13,
      "body": "Determining your ______ is the first step to creating an effective social media strategy."
    },
    ...
  ]
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer


POST /api/admin/learn/courses/:course_id/exams
Create Exam

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  exam: {
    title: "Exam"
  }
}

Success response body

{
  "id": 1,
  "title": "Exam"
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

exam
required

Validations:

  • Must be a Hash

exam[title]
required

Validations:

  • Must be a String


PUT /api/admin/learn/courses/:course_id/exams/:id
Update Exam

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  exam: {
    title: "Final Exam"
  }
}

Success response body

{
  "id": 1,
  "title": "Final Exam"
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer

exam
required

Validations:

  • Must be a Hash

exam[title]
required

Validations:

  • Must be a String


DELETE /api/admin/learn/courses/:course_id/exams/:id
Destroy Exam

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer